<?php

/**
 * Routes configuration
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.config
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/views/pages/home.ctp)...
 */
Router::connect('/', array('controller' => 'default', 'action' => 'index'));
Router::connect('/game-dien-thoai.html/*', array('controller' => 'default', 'action' => 'index'));
Router::connect('/game-mobile-hay-nhat.html', array('controller' => 'default', 'action' => 'hotest'));
Router::connect('/game-mobile-nhieu-nguoi-choi-nhat.html', array('controller' => 'default', 'action' => 'popular'));

/* tai game */
Router::connect(
                '/tai-game/:id',
                array('controller' => 'default', 'action' => 'download'),
                array('pass' => array('id'), 'id' => '[0-9]+')
);
Router::connect(
                '/thong-tin-game/:id-:slug',
                array('controller' => 'default', 'action' => 'detail'),
                array('pass' => array('id', 'slug'), 'id' => '[0-9]+')
);